import request from '@/utils/request'

// 资源目录
export function listUmsResourceCategory() {
    return request({
        url:'webApi/admin/resourceCategory/list',
        method:'get',
    })
}

export function addUmsResourceCategory(data) {
    return request({
        url:'webApi/admin/resourceCategory/add',
        method:'post',
        data:data
    })
}

export function updateUmsResourceCategory(id, data) {
    return request({
        url:'webApi/admin/resourceCategory/update/' + id,
        method:'post',
        data:data
    })
}

export function deletedUmsResourceCategory(id) {
    return request({
        url:'webApi/admin/resourceCategory/delete/' + id,
        method:'delete',
    })   
}

// 资源
export function listUmsResource(params) {
    return request({
        url:'webApi/admin/resource/list',
        method:'get',
        params:params
    })
}

export function listAllUmsResource() {
    return request({
        url:'webApi/admin/resource/listAll',
        method:'get'
    })
}


export function addUmsResource(data) {
    return request({
        url:'webApi/admin/resource/add',
        method:'post',
        data:data
    })
}

export function updateUmsResource(id, data) {
    return request({
        url:'webApi/admin/resource/update/' + id,
        method:'post',
        data:data
    })
}

export function deletedUmsResource(id) {
    return request({
        url:'webApi/admin/resource/delete/' + id,
        method:'delete',
    })   
}